#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
火车交通工具的api
script name: trains_api
Created on 2020/2/25 22:32 by PyCharm
@author: fujianjian
"""
from flask import jsonify

from app.vehicle import vehicle_blueprint


@vehicle_blueprint.route('/trains', methods=['post', 'get'])
def train_list():
    trains = [
        {
            'id': 1,
            'number': 'G1331'
        }, {
            'id': 2,
            'number': 'G1332'
        }, {
            'id': 3,
            'number': 'G1333'
        }, {
            'id': 4,
            'number': 'G1334'
        }, {
            'id': 5,
            'number': 'G1335'
        },
    ]
    return jsonify({'trans': trains})
